<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
	xmlns:ogc="http://www.opengis.net/ogc" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd
                      http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/expr.xsd">
	<namespaces>
		<Namespace>
			<prefix>gsmlp</prefix>
			<uri>http://xmlns.geosciml.org/geosciml-portrayal/2.0</uri>
		</Namespace>
		<Namespace>
			<prefix>gml</prefix>
			<uri>http://www.opengis.net/gml</uri>
		</Namespace>
		<Namespace>
			<prefix>xlink</prefix>
			<uri>http://www.w3.org/1999/xlink</uri>
		</Namespace>
		<Namespace>
		    <prefix>xsi</prefix>
		    <uri>http://www.w3.org/2001/XMLSchema-instance</uri>
		</Namespace>
	</namespaces>
	<sourceDataStores>
		<DataStore>
			<id>Borehole</id>
			<parameters>
				<Parameter>
					<name>directory</name>
					<value>file:./</value>
				</Parameter>
			</parameters>
		</DataStore>
	</sourceDataStores>
	<targetTypes>
		<FeatureType>
		    <schemaUri>geosciml-portrayal.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<sourceDataStore>Borehole</sourceDataStore>
			<sourceType>Gsml32Borehole</sourceType>
			<targetElement>gsmlp:BoreholeView</targetElement>
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>gsmlp:identifier</targetAttribute>					
					<sourceExpression>
                        <OCQL>BOREHOLE_ID</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:name</targetAttribute>					
					<sourceExpression>
                        <OCQL>ID</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:drillingMethod</targetAttribute>					
					<sourceExpression>
                        <OCQL>'Diamond'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:elevation_srs</targetAttribute>					
					<sourceExpression>
                        <OCQL>'http://www.opengis.net/def/crs/EPSG/0/5711'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:elevation_m</targetAttribute>					
					<sourceExpression>
                        <OCQL>'0.0'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:boreholeMaterialCustodian</targetAttribute>					
					<sourceExpression>
                        <OCQL>'CSIRO'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:boreholeLength_m</targetAttribute>					
					<sourceExpression>
                        <OCQL>INTERVAL_END+(-1*INTERVAL_BEGIN)</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:inclinationType</targetAttribute>					
					<sourceExpression>
                        <OCQL>'vertical'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:startPoint</targetAttribute>					
					<sourceExpression>
                        <OCQL>'natural ground surface'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:drillStartDate</targetAttribute>					
					<sourceExpression>
                        <OCQL>SAMPLING_DATE</OCQL>
                    </sourceExpression>
				</AttributeMapping>				
				<AttributeMapping>
					<targetAttribute>gsmlp:driller</targetAttribute>					
					<sourceExpression>
                        <OCQL>'DRILLER'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:specification_uri</targetAttribute>					
					<sourceExpression>
                        <OCQL>'http://some.spec.uri'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:metadata_uri</targetAttribute>					
					<sourceExpression>
                        <OCQL>'http://some.metadata.uri'</OCQL>
                    </sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gsmlp:shape</targetAttribute>					
					<sourceExpression>
                        <OCQL>GEOM</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>srsDimension</name>
                        <value>2</value>
                    </ClientProperty>
				</AttributeMapping>
			</attributeMappings>
		</FeatureTypeMapping>
	</typeMappings>
</as:AppSchemaDataAccess>